package com.szqhyxj.youxiangju.biz.creditReport.signature;

import com.szqhyxj.youxiangju.biz.creditReport.CreditReportEntity;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/4.
 */

public class SigntureModel {
    private interface SigntureService{
        @FormUrlEncoded
        @POST("merchant/realauth")
        Observable<BaseResult> commitmerchant(
                @Field("bankCardPic") String bankCardPic,
                @Field("cardId") String cardId,
                @Field("autographPic") String autographPic
        );

    }
    public static Observable<BaseResult> getCommitmerchant(CreditReportEntity reportEntity){
        return RetrofitFacade.Companion.getRetrofit().create(SigntureService.class)
                .commitmerchant(
                        reportEntity.getBankCardPic(),
                        reportEntity.getCardId(),
                        reportEntity.getAutographPic()
                );
    }


    public class ReportEntity {
        private String bankCardPic;
        private String bankCardNo;
        private String autographPic;

        public String getCardId() {
            return cardId;
        }

        public void setCardId(String cardId) {
            this.cardId = cardId;
        }

        private String cardId;

        public String getAutographPic() {
            return autographPic;
        }

        public void setAutographPic(String autographPic) {
            this.autographPic = autographPic;
        }



        public String getBankCardPic() {
            return bankCardPic;
        }

        public void setBankCardPic(String bankCardPic) {
            this.bankCardPic = bankCardPic;
        }

        public String getBankCardNo() {
            return bankCardNo;
        }

        public void setBankCardNo(String bankCardNo) {
            this.bankCardNo = bankCardNo;
        }


    }
}
